package com.example.design.apply;

import com.example.design.apply.bean.ApplyParam;
import com.example.design.apply.impl.DestroyedApply;
import com.example.design.apply.impl.LogisticsApply;

/**
 * @author 杜款
 * 申请抽象类
 */
public abstract class Apply {

    /**
     * 申请方法
     * @param applyParam 申请入参
     */
    public abstract void doApply(ApplyParam applyParam);

    public enum ApplyType{

        /** 毁单申请 */
        DESTROYED_APPLY(DestroyedApply.class),
        /** 物流申请 */
        LOGISTICS_APPLY(LogisticsApply.class);

        public final Class<? extends Apply> apply;

        ApplyType(Class<? extends Apply> applyClass) {
            this.apply = applyClass;
        }
    }
}
